﻿@using News.Models.Database
@using News.Models;
@{
	NewsContext _DateBase = new NewsContext();
	//查询 分类数据
	//           数据库上下文 所有分类结果
	var cates = _DateBase.Categories.ToList();
	//传递 分类数据
	//      参数的名字    参数的值
	ViewData["ALL_Categorys"] = cates;
}
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>NewWebsite</title>
	<link rel="stylesheet" href="css/index.css">
</head>

<body>
	<!--导航栏-->
	<div class="content">
		<div id="nav">
			<div class="nav_main">
				@{
					var category = ViewData["ALL_Categorys"] as List<Category>;
					int _NOW_CategoryID_ = 0;
					foreach (var item in category)
					{
						if (Public.NOW_CategoryID == item.CateId)
						{
							_NOW_CategoryID_ = item.CateId;
							<a href="/index.html?now_categoryid=@item.CateId&now_page=1" style="background-color:#950c02;color:red;">@item.CateName</a>
						}
						else
						{
							@* @item.CateName  分类对象.分类名字  *@
							<a href="/index.html?now_categoryid=@item.CateId&now_page=1">@item.CateName</a>
						}
					}
				}

				@*<a href="javascript:void(0)">互联网</a>
				<a href="javascript:void(0)">NBA</a>
				<a href="javascript:void(0)">汽车</a>
				<a href="javascript:void(0)">影视</a>
				<a href="javascript:void(0)">旅游</a>
				<a href="javascript:void(0)">科技</a>
				<a href="javascript:void(0)">农业</a>
				<a href="javascript:void(0)">房产</a>
				<a href="javascript:void(0)">国际</a>*@
				<form action="" class="" method="post">
					<input type="button" value="搜索" id="search">
					<input type="text" id="content" placeholder="请输入查找的内容">
				</form>
			</div>
		</div>




		<div id="main">

			@RenderBody()



		</div>
		<div class="footer">
			<p>
				<a href="javascript:void(0)">关于NewWebsite</a>
				|
				<a href="javascript:void(0)">诚聘英才</a>
				|
				<a href="javascript:void(0)">商务合作</a>
				|
				<a href="javascript:void(0)">法律声明</a>
				|
				<a href="javascript:void(0)">帮助中心</a>
				|
				<a href="javascript:void(0)">作者投稿</a>
				|
				<a href="javascript:void(0)">联系我们</a>
				|
				<a href="javascript:void(0)">友情链接</a>
			</p>
			<p>
				Copyright©www.newwebsite.com&nbsp;&nbsp;All&nbsp;&nbsp;Rights&nbsp;&nbsp;Reserved&nbsp;版权所有&nbsp;&nbsp;
				<a href="">京ICP备xxxxxxxx-2号</a>
			</p>
			<p>本站所收录新闻来源、社区话题、新闻评论均属其个人学习行为，不代表本站立场。</p>
		</div>
	</div>
	<script>

	</script>
</body>
@RenderSection("script", false);
</html>

@*<!DOCTYPE html>

			<html>
			<head>
			<meta name="viewport" content="width=device-width" />
			<title>@ViewBag.Title</title>
			</head>
			<body>
			<div>
			@RenderBody()
			</div>
			</body>
			</html>
			*@
